CC = gcc
CFLAGS = -lpthread -Wall
SRC = src
OBJ = obj
BIN = bin

all: pi.o
	@$(CC) $(OBJ)/*.o -o $(BIN)/PI $(CFLAGS)
	@echo completed compilation

pi.o:
	@$(CC) -c $(SRC)/PI.c -o $(OBJ)/PI.o
	@echo PI.o compiled

run:
	@echo running...
	@./$(BIN)/PI

time:
	@/usr/bin/time -f "%e" ./$(BIN)/PI

info:
	@phoronix-test-suite system-info

clear:
	@echo clearing all objects and executables files
	@rm $(BIN)/* $(OBJ)/*.o
